JavaScript Essentials for SAP ABAP Developers: A Guide to Mobile and Desktop Application Development by Rehan Zaidi

JavaScript Essentials for SAP ABAP Developers: A Guide to Mobile and Desktop Application Development by Rehan Zaidi
Author: Rehan Zaidi [Rehan Zaidi]
Language: eng
Format: epub
Publisher: Apress
Published: 2017-06-19

Listing 5-10. ignoreCase Property Example


<html>

<body>

<script>

var pattern1 = /Java/i;

console.log("IgnoreCase property is set:" + pattern1.ignoreCase);

var pattern2 = /Java/;

console.log("IgnoreCase property is set:" + pattern2.ignoreCase);

</script>

</body>

</html>

This example first declares regular expression pattern pattern1. In this case, the i modifier is specified, making it ignore the case. Next, the example declares pattern2 /Java/ without the ignoreCase modifier. In both cases, the output using the console.log method is generated for the ignoreCase property, as shown in Figure 5-10.